Environment Variable Support
The Backend module supports automatic agent ID detection from environment variables, eliminating the need to explicitly provide the agent ID in many scenarios.Supported Environment Variables
XPANDER_AGENT_ID
: The agent identifier that will be used when noagent_id
oragent
parameter is provided to the methods.
Environment Variable Usage
Introduction
The Backend Module provides comprehensive functionality for retrieving agent runtime arguments for execution within the xpander.ai platform. This module supports multiple AI frameworks and dispatches agent arguments accordingly.Overview
In this module, you can:- Resolve runtime arguments for agents with framework-specific configurations
- Support multiple AI frameworks through intelligent dispatching
- Handle both asynchronous and synchronous argument resolution
- Override default configurations with custom parameters
- Integrate with tasks for context-aware argument generation
Examples
Basic Agent Arguments Resolution
This example demonstrates how to resolve runtime arguments for an agent in both asynchronous and synchronous styles.Asynchronous Example
Synchronous Example
Using Pre-loaded Agent Instance
When you already have an Agent instance, you can use it directly for more efficient argument resolution.Asynchronous Example
Synchronous Example
Task Context Integration
Include task context for runtime-aware argument resolution.Asynchronous Example
Synchronous Example
Custom Overrides
Override default configurations with custom parameters.Asynchronous Example
Synchronous Example
Framework-Specific Usage
The Backend module automatically detects the agent’s framework and provides appropriate arguments.Agno Framework Example
Continue to the [Backend API Reference] for detailed documentation on classes and methods.
Related Documentation
Agents Module
Agent management and interaction
Tasks Module
Task execution and management
Configuration
SDK configuration and authentication
Types
Data types and models
Support
For additional help:- Full SDK Documentation
- Email: dev@xpander.ai